# MySQL
podman run -d \
  --name mysql-demo \
  -p 3306:3306 \
  -e TZ=Asia/Shanghai \
  -e MYSQL_ROOT_PASSWORD=123456 \
  -v /home/a/Documents/mysql-demo/data:/var/lib/mysql:Z \
  -v /home/a/Documents/mysql-demo/init:/docker-entrypoint-initdb.d:Z \
  -v /home/a/Documents/mysql-demo/conf:/etc/mysql/conf.d:Z \
  m.daocloud.io/docker.io/library/mysql:8.0



# Redis
podman run -d \
  --name redis-demo \
  -p 6379:6379 \
  -e TZ=Asia/Shanghai \
  -v /home/a/Documents/redis-demo/conf/redis-6.0.9.conf:/etc/redis/redis.conf:Z \
  -v /home/a/Documents/redis-demo/data:/data:Z \
  m.daocloud.io/docker.io/library/redis:6.0.9



# RabbitMQ
chmod a+rwx -R conf # 在创建 RabbitMQ 容器之前，要先将 advanced.config 放到 conf 目录中，再设置 conf 目录的权限

podman run -d \
  --name rabbitmq-demo \
  --hostname mq1 \
  -p 5672:5672 \
  -p 15672:15672 \
  -e RABBITMQ_DEFAULT_USER=itcast \
  -e RABBITMQ_DEFAULT_PASS=123321 \
  -v /etc/localtime:/etc/localtime:ro \
  -v /home/a/Documents/rabbitmq-demo/data:/var/lib/rabbitmq:Z \
  -v /home/a/Documents/rabbitmq-demo/conf:/etc/rabbitmq:Z \
  -v /home/a/Documents/rabbitmq-demo/log:/var/log/rabbitmq:Z \
  m.daocloud.io/docker.io/library/rabbitmq:3.8.5

<< BLOCK
podman run -d \
  --name rabbitmq-demo \
  --hostname mq1 \
  -p 5672:5672 \
  -p 15672:15672 \
  -v /etc/localtime:/etc/localtime:ro \
  -v /home/a/Documents/rabbitmq-demo/data:/var/lib/rabbitmq:Z \
  -v /home/a/Documents/rabbitmq-demo/conf:/etc/rabbitmq:Z \
  -v /home/a/Documents/rabbitmq-demo/log:/var/log/rabbitmq:Z \
  m.daocloud.io/docker.io/library/rabbitmq:3.8.5
BLOCK



# 停止所有容器
# podman stop $(docker ps -aq)